CC := g++ -I$(BOOST_LIB) -D_LINUX_ -DBOOST_ALL_NO_LIB -g
TargetDir := ../build/bin/
TargetName := bs.bin
OutDir := ../build/bs/
SOURCES := $(wildcard *.cpp)
OBJS := $(subst .cpp,.o,$(SOURCES))
OPTS := 

all: lib.a $(OBJS)
	mkdir -p $(TargetDir)
	mkdir -p $(OutDir)
#	cp $(TargetDir)lib.a $(OutDir)lib.a
#	$(CC) $(LINKS) $(foreach n,$(^F),$(OutDir)$(n)) -o $(TargetDir)$(TargetName)
	make -C command -f ../Makefile.in "CC=$(CC)" "OutDir=../$(OutDir)"
	$(CC) $(wildcard $(OutDir)*.o) $(TargetDir)libgeneral.a -o $(TargetDir)$(TargetName)

lib.a: 
	mkdir -p $(TargetDir)
	mkdir -p $(OutDir)
	make -C ../generallib/ 

%.o: %.cpp
	$(CC) $(OPTS) -c $< -o $(OutDir)$@
